import request from '../utils/request'

/**
 * 后面的每次请求需要携带token
 */
export const findDeptAndCount = () => {
    return request({
        url: "/system/department/findDeptAndCount/",
        method: 'get'
        
    })
}


export const getDepartment =(size,current,department) => {
    return request({
        url: "/hospital/department/getDepartments",
        method: "post",
        params:{
            size,
            current
        },
        data: department
    })
}

export const deleteDepartment = (departmentId) => {
    return request({
        url:"/hospital/department/deleteDepartment/"+departmentId,
        method:"get"
    })
}

export const saveDepartment =(department) => {
    return request({
        url:"/hospital/department/saveDepartment",
        method:"post",
        data: department
    })
}